import Vue from "vue"

Vue.config.productionTip = false
const nowRole = "jiangshi"

Vue.directive("role",{
    bind(){
        console.log("bind初始化");
    },
    inserted(el,binding){
        console.log(el);
        if(!binding.value.includes(nowRole)){
            el.remove()
        }
    },
    update(){
        console.log("虚拟dom更新 子节点未更新");
    },
    componentUpdated(){
        console.log("更新完毕");
    },
    unbind(){
        console.log("解绑");
    }
})